3.6 \(\int \frac{a+b \tan ^{-1}(c x)}{(d+e x)^2} \, dx\)

Optimal. Leaf size=98 \[ -\frac{a+b \tan ^{-1}(c x)}{e (d+e x)}-\frac{b c \log \left (c^2 x^2+1\right )}{2 \left (c^2 d^2+e^2\right )}+\frac{b c \log (d+e x)}{c^2 d^2+e^2}+\frac{b c^2 d \tan ^{-1}(c x)}{e \left (c^2 d^2+e^2\right )} \]

[Out]

(b*c^2*d*ArcTan[c*x])/(e*(c^2*d^2 + e^2)) - (a + b*ArcTan[c*x])/(e*(d + e*x)) + (b*c*Log[d + e*x])/(c^2*d^2 +
e^2) - (b*c*Log[1 + c^2*x^2])/(2*(c^2*d^2 + e^2))

________________________________________________________________________________________

Rubi [A]  time = 0.05334, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {4862, 706, 31, 635, 203, 260} \[ -\frac{a+b \tan ^{-1}(c x)}{e (d+e x)}-\frac{b c \log \left (c^2 x^2+1\right )}{2 \left (c^2 d^2+e^2\right )}+\frac{b c \log (d+e x)}{c^2 d^2+e^2}+\frac{b c^2 d \tan ^{-1}(c x)}{e \left (c^2 d^2+e^2\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])/(d + e*x)^2,x]

[Out]

(b*c^2*d*ArcTan[c*x])/(e*(c^2*d^2 + e^2)) - (a + b*ArcTan[c*x])/(e*(d + e*x)) + (b*c*Log[d + e*x])/(c^2*d^2 +
e^2) - (b*c*Log[1 + c^2*x^2])/(2*(c^2*d^2 + e^2))

Rule 4862

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b*
ArcTan[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{
a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 706

Int[1/(((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 + a*e^2), Int[1/(d + e*x), x],
 x] + Dist[1/(c*d^2 + a*e^2), Int[(c*d - c*e*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a
*e^2, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{a+b \tan ^{-1}(c x)}{(d+e x)^2} \, dx &=-\frac{a+b \tan ^{-1}(c x)}{e (d+e x)}+\frac{(b c) \int \frac{1}{(d+e x) \left (1+c^2 x^2\right )} \, dx}{e}\\ &=-\frac{a+b \tan ^{-1}(c x)}{e (d+e x)}+\frac{(b c) \int \frac{c^2 d-c^2 e x}{1+c^2 x^2} \, dx}{e \left (c^2 d^2+e^2\right )}+\frac{(b c e) \int \frac{1}{d+e x} \, dx}{c^2 d^2+e^2}\\ &=-\frac{a+b \tan ^{-1}(c x)}{e (d+e x)}+\frac{b c \log (d+e x)}{c^2 d^2+e^2}-\frac{\left (b c^3\right ) \int \frac{x}{1+c^2 x^2} \, dx}{c^2 d^2+e^2}+\frac{\left (b c^3 d\right ) \int \frac{1}{1+c^2 x^2} \, dx}{e \left (c^2 d^2+e^2\right )}\\ &=\frac{b c^2 d \tan ^{-1}(c x)}{e \left (c^2 d^2+e^2\right )}-\frac{a+b \tan ^{-1}(c x)}{e (d+e x)}+\frac{b c \log (d+e x)}{c^2 d^2+e^2}-\frac{b c \log \left (1+c^2 x^2\right )}{2 \left (c^2 d^2+e^2\right )}\\ \end{align*}

Mathematica [A]  time = 0.195202, size = 111, normalized size = 1.13 \[ \frac{\frac{b c \left (\left (\sqrt{-c^2} d-e\right ) \log \left (1-\sqrt{-c^2} x\right )-\left (\sqrt{-c^2} d+e\right ) \log \left (\sqrt{-c^2} x+1\right )+2 e \log (d+e x)\right )}{2 \left (c^2 d^2+e^2\right )}-\frac{a+b \tan ^{-1}(c x)}{d+e x}}{e} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTan[c*x])/(d + e*x)^2,x]

[Out]

(-((a + b*ArcTan[c*x])/(d + e*x)) + (b*c*((Sqrt[-c^2]*d - e)*Log[1 - Sqrt[-c^2]*x] - (Sqrt[-c^2]*d + e)*Log[1
+ Sqrt[-c^2]*x] + 2*e*Log[d + e*x]))/(2*(c^2*d^2 + e^2)))/e

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 118, normalized size = 1.2 \begin{align*} -{\frac{ac}{ \left ( ecx+dc \right ) e}}-{\frac{bc\arctan \left ( cx \right ) }{ \left ( ecx+dc \right ) e}}+{\frac{bc\ln \left ( ecx+dc \right ) }{{c}^{2}{d}^{2}+{e}^{2}}}-{\frac{bc\ln \left ({c}^{2}{x}^{2}+1 \right ) }{2\,{c}^{2}{d}^{2}+2\,{e}^{2}}}+{\frac{b{c}^{2}d\arctan \left ( cx \right ) }{e \left ({c}^{2}{d}^{2}+{e}^{2} \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))/(e*x+d)^2,x)

[Out]

-c*a/(c*e*x+c*d)/e-c*b/(c*e*x+c*d)/e*arctan(c*x)+c*b/(c^2*d^2+e^2)*ln(c*e*x+c*d)-1/2*b*c*ln(c^2*x^2+1)/(c^2*d^
2+e^2)+b*c^2*d*arctan(c*x)/e/(c^2*d^2+e^2)

________________________________________________________________________________________

Maxima [A]  time = 1.48091, size = 144, normalized size = 1.47 \begin{align*} \frac{1}{2} \,{\left ({\left (\frac{2 \, c d \arctan \left (c x\right )}{c^{2} d^{2} e + e^{3}} - \frac{\log \left (c^{2} x^{2} + 1\right )}{c^{2} d^{2} + e^{2}} + \frac{2 \, \log \left (e x + d\right )}{c^{2} d^{2} + e^{2}}\right )} c - \frac{2 \, \arctan \left (c x\right )}{e^{2} x + d e}\right )} b - \frac{a}{e^{2} x + d e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/(e*x+d)^2,x, algorithm="maxima")

[Out]

1/2*((2*c*d*arctan(c*x)/(c^2*d^2*e + e^3) - log(c^2*x^2 + 1)/(c^2*d^2 + e^2) + 2*log(e*x + d)/(c^2*d^2 + e^2))
*c - 2*arctan(c*x)/(e^2*x + d*e))*b - a/(e^2*x + d*e)

________________________________________________________________________________________

Fricas [A]  time = 2.50458, size = 259, normalized size = 2.64 \begin{align*} -\frac{2 \, a c^{2} d^{2} + 2 \, a e^{2} - 2 \,{\left (b c^{2} d e x - b e^{2}\right )} \arctan \left (c x\right ) +{\left (b c e^{2} x + b c d e\right )} \log \left (c^{2} x^{2} + 1\right ) - 2 \,{\left (b c e^{2} x + b c d e\right )} \log \left (e x + d\right )}{2 \,{\left (c^{2} d^{3} e + d e^{3} +{\left (c^{2} d^{2} e^{2} + e^{4}\right )} x\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/(e*x+d)^2,x, algorithm="fricas")

[Out]

-1/2*(2*a*c^2*d^2 + 2*a*e^2 - 2*(b*c^2*d*e*x - b*e^2)*arctan(c*x) + (b*c*e^2*x + b*c*d*e)*log(c^2*x^2 + 1) - 2
*(b*c*e^2*x + b*c*d*e)*log(e*x + d))/(c^2*d^3*e + d*e^3 + (c^2*d^2*e^2 + e^4)*x)

________________________________________________________________________________________

Sympy [A]  time = 46.2556, size = 777, normalized size = 7.93 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))/(e*x+d)**2,x)

[Out]

Piecewise((-2*a*d/(4*d**2*e + 4*d*e**2*x) + 2*a*e*x/(4*d**2*e + 4*d*e**2*x) + 2*I*b*d*atanh(e*x/d)/(4*d**2*e +
 4*d*e**2*x) + I*b*d/(4*d**2*e + 4*d*e**2*x) - 2*I*b*e*x*atanh(e*x/d)/(4*d**2*e + 4*d*e**2*x) - I*b*e*x/(4*d**
2*e + 4*d*e**2*x), Eq(c, -I*e/d)), (-2*a*d/(4*d**2*e + 4*d*e**2*x) + 2*a*e*x/(4*d**2*e + 4*d*e**2*x) - 2*I*b*d
*atanh(e*x/d)/(4*d**2*e + 4*d*e**2*x) - I*b*d/(4*d**2*e + 4*d*e**2*x) + 2*I*b*e*x*atanh(e*x/d)/(4*d**2*e + 4*d
*e**2*x) + I*b*e*x/(4*d**2*e + 4*d*e**2*x), Eq(c, I*e/d)), (zoo*(a*x + b*x*atan(c*x) - b*log(x**2 + c**(-2))/(
2*c)), Eq(d, -e*x)), ((a*x + b*x*atan(c*x) - b*log(x**2 + c**(-2))/(2*c))/d**2, Eq(e, 0)), (a*x/(d**2 + d*e*x)
, Eq(c, 0)), (-2*a*c**2*d**2/(2*c**2*d**3*e + 2*c**2*d**2*e**2*x + 2*d*e**3 + 2*e**4*x) - 2*a*e**2/(2*c**2*d**
3*e + 2*c**2*d**2*e**2*x + 2*d*e**3 + 2*e**4*x) + 2*b*c**2*d*e*x*atan(c*x)/(2*c**2*d**3*e + 2*c**2*d**2*e**2*x
 + 2*d*e**3 + 2*e**4*x) - b*c*d*e*log(x**2 + c**(-2))/(2*c**2*d**3*e + 2*c**2*d**2*e**2*x + 2*d*e**3 + 2*e**4*
x) + 2*b*c*d*e*log(d/e + x)/(2*c**2*d**3*e + 2*c**2*d**2*e**2*x + 2*d*e**3 + 2*e**4*x) - b*c*e**2*x*log(x**2 +
 c**(-2))/(2*c**2*d**3*e + 2*c**2*d**2*e**2*x + 2*d*e**3 + 2*e**4*x) + 2*b*c*e**2*x*log(d/e + x)/(2*c**2*d**3*
e + 2*c**2*d**2*e**2*x + 2*d*e**3 + 2*e**4*x) - 2*b*e**2*atan(c*x)/(2*c**2*d**3*e + 2*c**2*d**2*e**2*x + 2*d*e
**3 + 2*e**4*x), True))

________________________________________________________________________________________

Giac [A]  time = 1.14614, size = 217, normalized size = 2.21 \begin{align*} \frac{1}{2} \,{\left ({\left (\frac{2 \, c d \arctan \left (\frac{{\left (c^{2} d - \frac{c^{2} d^{2}}{x e + d} - \frac{e^{2}}{x e + d}\right )} e^{\left (-1\right )}}{c}\right ) e^{\left (-2\right )}}{c^{2} d^{2} e + e^{3}} - \frac{\log \left (c^{2} - \frac{2 \, c^{2} d}{x e + d} + \frac{c^{2} d^{2}}{{\left (x e + d\right )}^{2}} + \frac{e^{2}}{{\left (x e + d\right )}^{2}}\right )}{c^{2} d^{2} e^{2} + e^{4}}\right )} c e^{2} - \frac{2 \, \arctan \left (c x\right ) e^{\left (-1\right )}}{x e + d}\right )} b - \frac{a e^{\left (-1\right )}}{x e + d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/(e*x+d)^2,x, algorithm="giac")

[Out]

1/2*((2*c*d*arctan((c^2*d - c^2*d^2/(x*e + d) - e^2/(x*e + d))*e^(-1)/c)*e^(-2)/(c^2*d^2*e + e^3) - log(c^2 -
2*c^2*d/(x*e + d) + c^2*d^2/(x*e + d)^2 + e^2/(x*e + d)^2)/(c^2*d^2*e^2 + e^4))*c*e^2 - 2*arctan(c*x)*e^(-1)/(
x*e + d))*b - a*e^(-1)/(x*e + d)